package cn.zyl.common.redis.exception;

/** RedisBaseException异常类说明: redis模块基本异常信息
 * @author wsz
 * @date 2020-08-05
 * @version v1.0
 */
public class RedisBaseException extends RuntimeException {
    public RedisBaseException(String msg){ super(msg);}
    public RedisBaseException(Throwable e){ super(e);}
    public RedisBaseException(String msg,Throwable e){ super(msg,e);}
    public static void isTrueThrow(boolean boo,String msg) throws RedisBaseException{
        if(boo){throw new RedisBaseException(msg);}
    }
    public static void isTrueThrow(boolean boo,Throwable e) throws RedisBaseException{
        if(boo){throw new RedisBaseException(e);}
    }
    public static void isNullThrow(Object o,String msg) throws RedisBaseException{
        isTrueThrow(null == o,msg);
    }
}